package com.bootdo.mall.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.mall.dao.MallOrderLogDao;
import com.bootdo.mall.domain.MallOrderLog;
import com.bootdo.mall.service.MallOrderLogService;



@Service
public class MallOrderLogServiceImpl implements MallOrderLogService {
	@Autowired
	private MallOrderLogDao mallOrderLogDao;
	
	@Override
	public MallOrderLog get(Long id){
		return mallOrderLogDao.get(id);
	}
	
	@Override
	public List<MallOrderLog> list(Map<String, Object> map){
		return mallOrderLogDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return mallOrderLogDao.count(map);
	}
	
	@Override
	public int save(MallOrderLog mallOrderLog){
	
		if(mallOrderLog.getId() != null) {
			return mallOrderLogDao.update(mallOrderLog);
		}else {
			return mallOrderLogDao.save(mallOrderLog);
		}		
	
		
	}
	
	@Override
	public int update(MallOrderLog mallOrderLog){
		return mallOrderLogDao.update(mallOrderLog);
	}

	@Override
	public int updateIsTuiKuanById(Long id, Integer num) {
		return mallOrderLogDao.updateIsTuiKuanById(id, num);
	}



	@Override
	public int remove(Long id){
		return mallOrderLogDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return mallOrderLogDao.batchRemove(ids);
	}
	
}
